package com.deli.springboot.service;

import com.deli.springboot.entity.Comment;
import com.deli.springboot.mapper.CommentMapper;
import com.deli.springboot.repository.CommentRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public List<Comment> findByExample(Comment comment) {
        List<Comment> comments = commentMapper.selectByExample(comment);
        return comments;

    }

    @Override
    public Integer add(Comment comment) {
        return commentMapper.add(comment);

    }
}
